<script setup lang='ts'>
// 自定义 规则
//interface Props {
//}
import AliIcon from '@/components/AliIcon/index.vue'
import { defineEmits } from 'vue';
import { authStaff, navigateTo } from '@/public'
import { usePdcStore, useTeamStore } from '@/store'
// import { https } from '@/api/api';
// import SelecTeam from './selectTeam.vue'
const emits = defineEmits(['showBubble', 'refresh', 'position', 'overview', 'layer', 'point', 'search'])
/**
 * @property 变量
 */
const pdcStore = usePdcStore();

/**
 * @property  所有请求以api开头 如:apiDataInfo
 */

/**
 * @property 自定义事件 以事件名开头 如: clickButton,inputDev
 */

// 点击足迹
const clickFootprint = async () => {
    navigateTo('/pages/footprint/index')
}
/**
 * @property 内置方法
 */


</script>
<template>
    <div class="fixed left-10 b-rd-1 bottom-[120px]">
        <div class=" p-2 b-rd-1 bg-[#fff] fc font-size-24"  @click="emits('showBubble')">
            Aa
        </div>
        <div class="mt-2 p-2 b-rd-1 bg-[#fff] fc" @click="emits('refresh')">
            <up-icon name="reload" color="#000" size="30rpx"></up-icon>
        </div>
        <div class="mt-2 p-2 b-rd-1 bg-[#fff] fc"  @click="emits('position')">
            <AliIcon icon-name="icon-wodeweizhi" font-size="30" />
        </div>
    </div>

    <div class="fixed right-10 b-rd-1 bg-[#fff] bottom-[120px]" >
        <div class="fc flex-col p-2" @click="emits('overview')">
            <AliIcon icon-name="icon-quanlan" font-size="30" />
            <text class="font-size-18">全览</text>
        </div>
        <div class="fc p-2 flex-col" @click="emits('point')" v-if="authStaff()">
            <AliIcon icon-name="icon-weizhi" font-size="30rpx" />
            <text class="font-size-18">添加</text>
        </div>
        <div class="fc p-2 flex-col" @click="clickFootprint">
            <AliIcon icon-name="icon-zuji" font-size="30rpx" />
            <text class="font-size-18">足迹</text>
        </div>
    </div>
    <div class="fixed right-10 p-2 b-rd-1 bg-[#fff] fc top-[120px]" @click="emits('search')">
        <AliIcon icon-name="icon-sousuoicon" font-size="30" />
    </div>
    <div class="fixed left-10 w-300 h-50 b-rd-1 bg-[#fff] fc font-size-24 top-[120px]"
        @click="navigateTo('/pages/pdcList/index')">
        <text v-if="pdcStore.pdc.province"> {{ pdcStore.pdc.province }}</text>
        <text v-if="pdcStore.pdc.city"> /{{ pdcStore.pdc.city }}</text>
        <text class="mr-1" v-if="pdcStore.pdc.district"> /{{ pdcStore.pdc.district }}</text>
        <text class="mr-1" v-if="!pdcStore.pdc.province">全国</text>
        <up-icon name="arrow-down" size="12"></up-icon>
    </div>
</template>
<style lang="scss" scoped>
:deep(.uni-calendar__content) {
    z-index: 10098;
}
</style>